package com.tuanzi.loan.web.lazy.system;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.log.service.LoginLogService;
import com.tuanzi.loan.log.vo.request.LoginLogSearchRequest;
import com.tuanzi.loan.log.vo.response.LoginLogSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public class LoginLogLazyDataModel extends BaseLazyDataModel<LoginLogSearchRequest, LoginLogSearchResponse> {

	private static final long serialVersionUID = 9143007553234885156L;

	private LoginLogService loginLogService = SpringContextHolder.getBean(LoginLogService.class);

	public LoginLogLazyDataModel(LoginLogSearchRequest partnerSearchRequest) {
		super(partnerSearchRequest);
	}

	@Override
	protected Page<LoginLogSearchResponse> doLoad(PageSearcher<LoginLogSearchRequest> pageSearcher) {
		return loginLogService.list(pageSearcher);
	}

}
